package com.gl.saasservice.repository;

import com.gl.saasservice.entity.SmartLockCard;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface SmartLockCardRepository extends PagingAndSortingRepository<SmartLockCard,Long>, JpaSpecificationExecutor<SmartLockCard> {

    List<SmartLockCard> findByCardId(String cardId);
    List<SmartLockCard> findByLockId(Long lockId);
    SmartLockCard findByLockAuthIdAndType(Long authId, Integer type);

    int deleteByCardId(String cardId);

}
